4
How can I fit or ensure that all elements are in the control's client area
Procedure OnCreate
	Forward Send OnCreate
	Variant voElements
	Get ComElements to voElements
	Handle hoElements
	Get Create (RefClass(cComElements)) to hoElements
	Set pvComObject of hoElements to voElements
		Variant voElement
		Get ComAdd of hoElements "Element A" -500 -500 to voElement
		Handle hoElement
		Get Create (RefClass(cComElement)) to hoElement
		Set pvComObject of hoElement to voElement
			Set ComBackColor of hoElement to (RGB(0,255,0))
		Send Destroy to hoElement
		Variant voElement1
		Get ComAdd of hoElements "Element B" 500 500 to voElement1
		Handle hoElement1
		Get Create (RefClass(cComElement)) to hoElement1
		Set pvComObject of hoElement1 to voElement1
			Set ComBackColor of hoElement1 to (RGB(255,0,0))
		Send Destroy to hoElement1
		Get ComAdd of hoElements "Element C" 48 24 to Nothing
	Send Destroy to hoElements
	Send ComFitToClient
End_Procedure
3
Context Menu - Microsoft Windows 8.1 - Ribbon Like

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_background.ebn" to Nothing
		Get ComAdd of hoAppearance 2 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_groupt.ebn" to Nothing
		Get ComAdd of hoAppearance 12 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_hot.ebn" to Nothing
		Get ComAdd of hoAppearance 14 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_select.ebn" to Nothing
		Get ComAdd of hoAppearance 17 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_tab.ebn" to Nothing
		Get ComAdd of hoAppearance 18 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_tabhot.ebn" to Nothing
		Get ComAdd of hoAppearance 30 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_radio0.ebn" to Nothing
		Get ComAdd of hoAppearance 31 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_radio1.ebn" to Nothing
		Get ComAdd of hoAppearance 32 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_check0.ebn" to Nothing
		Get ComAdd of hoAppearance 33 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_check1.ebn" to Nothing
		Get ComAdd of hoAppearance 34 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_buttonu.ebn" to Nothing
		Get ComAdd of hoAppearance 35 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSFlat-Ribbon/msfr_buttond.ebn" to Nothing
	Send Destroy to hoAppearance
	Set ComBackground OLEexContextMenuAppearance to |CI$1000000
	Set ComBackground OLEexToolTipAppearance to |CI$1fefefe
	Set ComBackground OLEexContextMenuSelBackColor to |CI$e000000
	Set ComBackground OLEexToolBarAppearance to |CI$1000000
	Set ComBackground OLEexToolBarBackColor to (RGB(255,255,255))
	Set ComBackground OLEexToolBarButtonHotBackColor to |CI$c000000
	Set ComBackground OLEexToolBarButtonDownBackColor to |CI$e000000
	Set ComBackground OLEexContextMenuHotBackColor to |CI$c000000
	Set ComBackground OLEexContextMenuSelHotBackColor to |CI$23000000
	Set ComBackground |CI$2 to |CI$22000000
	Set ComBackground |CI$3 to |CI$23000000
	Set ComBackground OLEexCheckBoxState0 to |CI$20000000
	Set ComBackground OLEexCheckBoxState1 to |CI$21000000
	Set ComBackground OLEexRadioButtonState0 to |CI$1e000000
	Set ComBackground OLEexRadioButtonState1 to |CI$1f000000
	Send ComEndUpdate
End_Procedure
2
Context Menu - Microsoft Paint - Ribbon Like

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_background.ebn" to Nothing
		Get ComAdd of hoAppearance 2 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_groupt.ebn" to Nothing
		Get ComAdd of hoAppearance 3 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_groupo.ebn" to Nothing
		Get ComAdd of hoAppearance 4 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_grouphot.ebn" to Nothing
		Get ComAdd of hoAppearance 5 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_frameh.ebn" to Nothing
		Get ComAdd of hoAppearance 6 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framehs.ebn" to Nothing
		Get ComAdd of hoAppearance 7 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framehi.ebn" to Nothing
		Get ComAdd of hoAppearance 8 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framehe.ebn" to Nothing
		Get ComAdd of hoAppearance 9 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framevs.ebn" to Nothing
		Get ComAdd of hoAppearance 10 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_framevi.ebn" to Nothing
		Get ComAdd of hoAppearance 11 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_frameve.ebn" to Nothing
		Get ComAdd of hoAppearance 12 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_select.ebn" to Nothing
		Get ComAdd of hoAppearance 13 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_bordert.ebn" to Nothing
		Get ComAdd of hoAppearance 14 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_buttond.ebn" to Nothing
		Get ComAdd of hoAppearance 15 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_buttonu.ebn" to Nothing
		Get ComAdd of hoAppearance 16 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_tab.ebn" to Nothing
		Get ComAdd of hoAppearance 17 "CP:16 0 0 0 1" to Nothing
		Get ComAdd of hoAppearance 18 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_tabhot.ebn" to Nothing
		Get ComAdd of hoAppearance 19 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSPaint-Ribbon/mspr_tabselhot.ebn" to Nothing
		Get ComAdd of hoAppearance 20 "CP:19 0 0 0 1" to Nothing
	Send Destroy to hoAppearance
	Set ComBackground OLEexContextMenuAppearance to |CI$1000000
	Set ComBackground OLEexContextMenuForeColor to (RGB(21,66,139))
	Set ComBackground OLEexContextMenuSelBackColor to |CI$e000000
	Set ComBackground OLEexToolTipAppearance to |CI$1fefefe
	Set ComBackground OLEexToolBarAppearance to |CI$1000000
	Set ComBackground OLEexToolBarBackColor to (RGB(255,255,255))
	Set ComBackground OLEexToolBarButtonHotBackColor to |CI$d000000
	Set ComBackground OLEexToolBarButtonDownBackColor to |CI$1000000
	Set ComBackground |CI$2 to |CI$d000000
	Set ComBackground OLEexContextMenuGroupPopupFrameSingle to |CI$5000000
	Set ComBackground OLEexContextMenuGroupPopupFrameHStart to |CI$6000000
	Set ComBackground OLEexContextMenuGroupPopupFrameHIntermediate to |CI$7000000
	Set ComBackground OLEexContextMenuGroupPopupFrameHEnd to |CI$8000000
	Set ComBackground OLEexContextMenuGroupPopupFrameVStart to |CI$9000000
	Set ComBackground OLEexContextMenuGroupPopupFrameVIntermediate to |CI$a000000
	Set ComBackground OLEexContextMenuGroupPopupFrameVEnd to |CI$b000000
	Set ComBackground OLEexContextMenuHotBackColor to |CI$c000000
	Set ComBackground OLEexContextMenuSelHotBackColor to |CI$f000000
	Send ComEndUpdate
End_Procedure
1
Context Menu - Microsoft Office - Ribbon Like

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Variant voAppearance
	Get ComVisualAppearance to voAppearance
	Handle hoAppearance
	Get Create (RefClass(cComAppearance)) to hoAppearance
	Set pvComObject of hoAppearance to voAppearance
		Get ComAdd of hoAppearance 1 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_background.ebn" to Nothing
		Get ComAdd of hoAppearance 2 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_groupt.ebn" to Nothing
		Get ComAdd of hoAppearance 3 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_groupo.ebn" to Nothing
		Get ComAdd of hoAppearance 4 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_grouphot.ebn" to Nothing
		Get ComAdd of hoAppearance 5 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_frameh.ebn" to Nothing
		Get ComAdd of hoAppearance 6 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framehs.ebn" to Nothing
		Get ComAdd of hoAppearance 7 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framehi.ebn" to Nothing
		Get ComAdd of hoAppearance 8 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framehe.ebn" to Nothing
		Get ComAdd of hoAppearance 9 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framevs.ebn" to Nothing
		Get ComAdd of hoAppearance 10 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_framevi.ebn" to Nothing
		Get ComAdd of hoAppearance 11 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_frameve.ebn" to Nothing
		Get ComAdd of hoAppearance 12 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_select.ebn" to Nothing
		Get ComAdd of hoAppearance 13 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_bordert.ebn" to Nothing
		Get ComAdd of hoAppearance 14 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_buttond.ebn" to Nothing
		Get ComAdd of hoAppearance 15 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_buttonu.ebn" to Nothing
		Get ComAdd of hoAppearance 16 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_tab.ebn" to Nothing
		Get ComAdd of hoAppearance 17 "CP:16 0 0 0 1" to Nothing
		Get ComAdd of hoAppearance 18 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_tabhot.ebn" to Nothing
		Get ComAdd of hoAppearance 19 "C:/Program Files/Exontrol/ExSwimLane/Sample/EBN/MSOffice-Ribbon/msor_tabselhot.ebn" to Nothing
		Get ComAdd of hoAppearance 20 "CP:19 0 0 0 1" to Nothing
	Send Destroy to hoAppearance
	Set ComBackground OLEexContextMenuAppearance to |CI$1000000
	Set ComBackground OLEexContextMenuForeColor to (RGB(21,66,139))
	Set ComBackground OLEexToolTipAppearance to |CI$1fefefe
	Set ComBackground OLEexToolBarAppearance to |CI$1000000
	Set ComBackground OLEexToolBarBackColor to (RGB(255,255,255))
	Set ComBackground OLEexToolBarButtonHotBackColor to |CI$d000000
	Set ComBackground OLEexToolBarButtonDownBackColor to |CI$1000000
	Set ComBackground |CI$2 to |CI$d000000
	Set ComBackground |CI$3 to |CI$1000000
	Set ComBackground OLEexContextMenuGroupPopupFrameSingle to |CI$5000000
	Set ComBackground OLEexContextMenuGroupPopupFrameHStart to |CI$6000000
	Set ComBackground OLEexContextMenuGroupPopupFrameHIntermediate to |CI$7000000
	Set ComBackground OLEexContextMenuGroupPopupFrameHEnd to |CI$8000000
	Set ComBackground OLEexContextMenuGroupPopupFrameVStart to |CI$9000000
	Set ComBackground OLEexContextMenuGroupPopupFrameVIntermediate to |CI$a000000
	Set ComBackground OLEexContextMenuGroupPopupFrameVEnd to |CI$b000000
	Set ComBackground OLEexContextMenuHotBackColor to |CI$c000000
	Set ComBackground OLEexContextMenuSelBackColor to |CI$e000000
	Set ComBackground OLEexContextMenuSelHotBackColor to |CI$f000000
	Send ComEndUpdate
End_Procedure